function gtAlert(content) {
    var html = '<style>.gt-alert{position: fixed;height:30px;' +
        'background: rgba(59,59,59,90);border-radius: 2px;' +
        'color: #eee;font-size:14px;' +
        'box-shadow:0px 0px 2px #333;' +
        'top:45%;  left:46%;  line-height: 28px;  padding:2px 10px;  ' +
        'font-family: "Courier New", Monospace; }' +
        '</style>' +
        '<div class="gt-alert">';
    html = html + content;
    html=html+"</div>"
    $("html").append(html);
    $(".gt-alert").fadeOut(1600);
}
//检查密码长度
function is_password (password) {
    var len = password.length;
    return len > 5 && len < 17;
}

function mobile_exists (mobile) {
    return $.ajax({type:'post', async:false, url:'/index.php/Home/User/checkfield', data:'type=mobile&value=' + mobile}).responseText;
}
function is_mobile(mobile){
    if(mobile.length==0) return false;
    var objReg = new RegExp("^1[0-9]{10}","gi");
    var IsRightFmt = objReg.test(mobile);
        return IsRightFmt;
}
